package com.pacy.pacybaseproject.adapters;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.pacy.pacybaseproject.R;
import com.pacy.pacybaseproject.beans.HomeMsgBean;
import com.pacy.pacybaseproject.beans.MenuBean;

/**
 * @author PACY
 * @date 2024/1/3
 * description:
 */
public class HomeMsgAdapter extends BaseQuickAdapter<HomeMsgBean, BaseViewHolder> {
    public HomeMsgAdapter() {
        super(R.layout.home_msg_item_view);
    }

    @Override
    protected void convert(BaseViewHolder holder, HomeMsgBean s) {
        if(s.getType()==0){
            holder.setImageResource(R.id.icon,R.drawable.home_msg_tishi);
        }else{
            holder.setImageResource(R.id.icon,R.drawable.home_msg_jiaotong);
        }
        holder.setText(R.id.content,s.getContent()).setText(R.id.time,s.getTime());
    }
}
